Invalid query:
 select __id from CatCategories where ebayID=''

MySQL server has gone away